package com.boss.core.common;

import org.kohsuke.stapler.DataBoundConstructor;

/**
 * This class is used to handle the situation when we have multiple-target containers in the build order.
 * When the user adds multiple target containers in the order form each of them is created as an instance
 * and while accessing the values of each 'instance' via the submitted JSON object this class is used as
 * a template in the bindJSONToList method.
 *
 * @author Momin Noor Khan
 */

public class Target {
    private String environment;
    private String server;
    private String port;

    @DataBoundConstructor
    public Target(String environment, String server, String port) {
        this.environment = environment;
        this.server = server;
        this.port = port;
    }

    /**
     * Gets the value of environment in this instance of target profile.
     * @return
     */
    public String getEnvironment() {
        return environment;
    }

    /**
     * Gets the value of server in this instance of target profile.
     * @return
     */
    public String getServer() {
        return server;
    }

    /**
     * Gets the value of port in this instance of target profile.
     * @return
     */
    public String getPort() {
        return port;
    }
}
